
# get QLOG module info
import os
home = os.getenv('HOME')
QLOG_QMODULE = '%s/qmodule/qlog' % home
QLOG_INC = '%s/include' % QLOG_QMODULE
QLOG_LIBPATH = '%s/lib' % QLOG_QMODULE

env = Environment()
env[ 'CCFLAGS' ] = '-g -O2 -fPIC  -D_THREAD_SAFE -pthread  -Wall -Wno-sign-compare'
env[ 'CPPPATH' ] = ['../include','../../include','../../../include',QLOG_INC,'/home/s/include', ]
env[ 'CPPFLAGS' ] = []
env[ 'LIBPATH' ] = ['../lib','../../lib','../../../lib',QLOG_LIBPATH,'/home/s/lib/static', ]
env[ 'LIBS' ] = ['bocat_logging','bocat_common','qlog','boost_program_options-mt','boost_filesystem-mt', 'boost_system-mt', 'boost_thread-mt','z','pthread',]


sink_target = 'wbsinker.so'
sink_sources = [ 'wbsinker.cpp','storage.cpp','fifo_storage.cpp', ]
solibs=env.SharedLibrary( sink_target, sink_sources, LINKFLAGS='-Wl,-E' )
solib = str(solibs[0])

env.Command( '../lib/%s' % solib, solib, Copy("$TARGET","$SOURCE") )
for header in ('amsgmanip.hpp','nmapconfig.hpp','nmaper.hpp',) :
	env.Command( '../include/%s' % header, header, Copy("$TARGET","$SOURCE") )

